home *** CD-ROM | disk | FTP | other *** search
/ PC Open 100 / PC Open 100 CD 1.bin / CD1 / INTERNET / WEBDESIGN / Tsw WebCoder / tswwebcoder5en.exe / {app} / data / projects / todolist.xsl
Encoding:
Extensible Markup Language  |  2004-04-14  |  1.8 KB  |  71 lines

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:template match="/">
  4.   <html>
  5.  
  6.   <head>
  7.    <title>TODO list for project "<xsl:value-of select="todolist/@projectname"/>"</title>
  8.   <style>
  9.        body {
  10.            font-family: Verdana;
  11.            font-size: 10px;
  12.        }
  13.       h3 {
  14.           color: black;
  15.       }
  16.       .statusbar {
  17.           border: 1px solid black;
  18.       }
  19.       .bar {
  20.           background-color: #BFD0E0;
  21.           text-align: right;
  22.           padding-right: 5px;
  23.           font-weight: bold;
  24.       }
  25.       table {
  26.            font-family: Verdana;
  27.            font-size: 11px;      
  28.       }
  29.   </style>
  30.   </head>
  31.   <body>
  32.       <h3>TODO list for project "<xsl:value-of select="todolist/@projectname"/>"</h3>
  33.     <table style="width: 100%;">
  34.     <tr bgcolor="#eeeeee">
  35.       <th style="width: 15%;">Subject</th>
  36.       <th style="width: 10%;">Priority</th>      
  37.       <th style="width: 10%;">Complete</th>      
  38.       <th style="width: 15%;">Status</th>
  39.       <th style="width: 50%;">Notes</th>      
  40.     </tr>
  41.     <xsl:for-each select="todolist/todoitem">
  42.     <xsl:sort select="completion"/>
  43.     <tr style="vertical-align: center;">
  44.       <td>
  45.           <xsl:value-of select="caption"/>
  46.       </td>
  47.       <td>
  48.       <xsl:value-of select="priority"/>
  49.       </td>      
  50.       <td><div class="statusbar">
  51.           <xsl:element name="div">
  52.           <xsl:attribute name="class">bar</xsl:attribute>
  53.         <xsl:attribute name="style">width: <xsl:value-of select="completion" /></xsl:attribute>
  54.         <xsl:value-of select="completion" />   
  55.         </xsl:element>
  56.       </div>
  57.       </td>
  58.       
  59.       <td>
  60.       <xsl:value-of select="status"/>
  61.       </td>
  62.       <td>
  63.       <xsl:value-of select="notes"/>      
  64.       </td>
  65.     </tr>
  66.     </xsl:for-each>
  67.     </table>
  68.   </body>
  69.   </html>
  70. </xsl:template></xsl:stylesheet>
  71.